<?php
/**
 * Created by PhpStorm.
 * User: guanfangge
 * Date: 4/27/22
 * Time: 4:15 PM
 */
namespace App\Queue;

use EasySwoole\Component\Process\AbstractProcess;
use EasySwoole\Queue\Job;

class QueueProcess extends AbstractProcess
{
    protected function run($arg)
    {
        go(function (){
            MyQueue::getInstance()->consumer()->listen(function (Job $job){
                var_dump("消费".$job->getJobData().date("Y-m-d H:i:s"));
            });
        });
    }
}